<?php
$route->any('login', 'AuthController@login')->name('admin.user.login');



$route->any('test', 'TestController@index');




//h5 首页
$route->any('h5/homepage', 'H5Controller@homePage');
$route->any('h5/news/list', 'H5Controller@newsList');
$route->any('h5/project/list', 'H5Controller@projectList');
$route->get('category/index', 'CategoryController@index');
$route->get('config/index', 'ConfigController@index');
$route->get('h5/project/info', 'H5Controller@projectInfo');
$route->get('h5/news/info', 'H5Controller@newsInfo');
$route->any('apply/store', 'ApplyController@store');
$route->get('config/index', 'ConfigController@index');

//pc端
$route->any('pc/category/top', 'PcController@topTenProject');
$route->any('pc/homepage', 'PcController@homePage');
$route->any('pc/project/list', 'PcController@projectList');
$route->any('pc/project/info', 'PcController@projectInfo');
$route->any('pc/rank/list', 'PcController@rankList');
$route->any('pc/news/list', 'PcController@newsList');
$route->any('pc/news/child/list', 'PcController@news_child');
$route->any('pc/news/info', 'PcController@newsInfo');

$route->group(['middleware' => 'api.auth'], function ($route) {
    
    //管理员
    $route->get('admin/index', 'AdminController@index')->name('admin.admin.index');
    $route->get('logout', 'AdminController@logout')->name('admin.admin.logout');
    $route->post('admin/store', 'AdminController@store')->name('admin.admin.store');
    $route->post('password/update', 'AdminController@updatePwd')->name('admin.password.update');
    $route->any('permission', 'AuthController@permission');
    $route->any('reset/password', 'AdminController@resetPassword');
    $route->any('admin/destroy', 'AdminController@destroy');
    $route->any('admin/info', 'AdminController@info');

    //category

    $route->get('category/info', 'CategoryController@info');
    $route->post('category/store', 'CategoryController@store');
    $route->post('category/destroy', 'CategoryController@destroy');

    //project
    $route->get('project/index', 'ProjectController@index');
    $route->get('project/info', 'ProjectController@info');
    $route->any('project/destroy', 'ProjectController@destroy');
    $route->post('project/store', 'ProjectController@store');
    $route->post('project/edit/status', 'ProjectController@editStatus');

    //config

    $route->any('config/info', 'ConfigController@info');
    $route->any('config/store', 'ConfigController@store');


    //news
    $route->get('news/index', 'NewsController@index');
    $route->get('news/info', 'NewsController@info');
    $route->any('news/destroy', 'NewsController@destroy');
    $route->post('news/store', 'NewsController@store');
    $route->post('news/edit/status', 'NewsController@editStatus');


    //banner
    $route->get('banner/index', 'BannerController@index')->name('admin.banner.index');
    $route->get('banner/info', 'BannerController@info')->name('admin.banner.info');
    $route->post('banner/store', 'BannerController@store')->name('admin.banner.store');
    $route->post('banner/destroy', 'BannerController@destroy')->name('admin.banner.destroy');


    //adv
    $route->get('adv/index', 'AdvController@index');
    $route->get('adv/info', 'AdvController@info');
    $route->any('adv/destroy', 'AdvController@destroy');
    $route->post('adv/store', 'AdvController@store');

    //link
    $route->get('link/index', 'LinkController@index');
    $route->get('link/info', 'LinkController@info');
    $route->any('link/destroy', 'LinkController@destroy');
    $route->post('link/store', 'LinkController@store');
    $route->post('link/edit/status', 'LinkController@editStatus');

    //apply
    $route->get('apply/index', 'ApplyController@index');


});

